
import {requestInfo} from '@/api/public.js'

/**
 * 维修评价
 */
export class FeedbackService {
    // 分页查询列表
    static findFeedbacks (queryParams) {
        return requestInfo({
            url: '/repair/repairManagement/Feedback/findFeedbacks',
            method: 'POST',
            data: queryParams
        });
    }

    //根据ID查询指定的维修评价
    static findFeedback (feedbackId) {
        const query = {
            feedbackId
        }
        return requestInfo({
            url: '/repair/repairManagement/Feedback/findFeedback',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的维修评价(包含外键名称)
    static findFeedbackForView (feedbackId) {
        const query = {
            feedbackId
        }
        return requestInfo({
            url: '/repair/repairManagement/Feedback/findFeedbackForView',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的维修评价(包含外键名称)
    static findFeedbackForEdit (feedbackId) {
        const query = {
            feedbackId
        }
        return requestInfo({
            url: '/repair/repairManagement/Feedback/findFeedbackForEdit',
            method: 'POST',
            params: query,
        });
    }

    //根据ID查询指定的维修评价(只提取ID 和 Name)
    static findFeedbacksWithIdNameById (feedbackId) {
        const query = {
            feedbackId
        }
        return requestInfo({
            url: '/repair/repairManagement/Feedback/findFeedbacksWithIdNameById',
            method: 'POST',
            params: query,
        });
    }

    //根据名称查询维修评价集合(只提取ID 和 Name)
    static findFeedbacksWithIdNameByName (feedbackName) {
        const query = {
            feedbackName
        }
        return requestInfo({
            url: '/repair/repairManagement/Feedback/findFeedbacksWithIdNameByName',
            method: 'POST',
            params: query,
        });
    }

    //新增保存维修评价
    static saveFeedback (feedback) {
        const query = {}
        return requestInfo({
            url: '/repair/repairManagement/Feedback/saveFeedback',
            method: 'POST',
            params: query,
            data: feedback
        });
    }

    //修改保存维修评价
    static updateFeedback (feedback) {
        const query = {}
        return requestInfo({
            url: '/repair/repairManagement/Feedback/updateFeedback',
            method: 'POST',
            params: query,
            data: feedback
        });
    }

    //根据ID查询指定的维修评价(只提取ID 和 Name)
    static deleteFeedback (feedbackId) {
        const query = {
            feedbackId
        }
        return requestInfo({
            url: '/repair/repairManagement/Feedback/deleteFeedback',
            method: 'POST',
            params: query,
        });
    }
}
